<%@taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<script>
    var browserType;

    if (document.layers) {browserType = "nn4"}
    if (document.all) {browserType = "ie"}
    if (window.navigator.userAgent.toLowerCase().match("gecko")) {
        browserType= "gecko"
    }

    function hide(id) {
        if (browserType == "gecko" )
            document.poppedLayer =
            eval('document.getElementById(id)');
        else if (browserType == "ie")
            document.poppedLayer =
            eval('document.getElementById(id)');
        else
            document.poppedLayer =
            eval('document.layers[id]');
        document.poppedLayer.style.display = "none";
    }


    function show(id) {
        if (browserType == "gecko" )
            document.poppedLayer =
            eval('document.getElementById(id)');
        else if (browserType == "ie")
            document.poppedLayer =
            eval('document.getElementById(id)');
        else
            document.poppedLayer =
            eval('document.layers[id]');
        document.poppedLayer.style.display = "block";
    }

</script>
<TABLE class="table0" cellSpacing=0 cellPadding=0 align=center width="350" bgcolor="#FFFFFF">
    <TR>
        <TD class="td1"></TD>

        <TD class="top"></TD>
        <TD class="topright"></TD>
    </TR>
    <TR>
        <TD class="middleleft" rowSpan=3></TD>
        <TD bgcolor="#F0F0F0">
            <center> <h4>Information Search</h4></center>

        </TD>
        <TD class="middleright" rowSpan=3></TD>
    </TR>
    <TR>
        <TD class="middlecenter"></TD>
    </TR>
    <TR>
        <TD class="main">
            <table width="240">
                <tr>
                    <td>
                        <div>
                            <form>

                                <input type="radio" name="search" checked="checked" onClick="show('tour');hide('car');hide('flight');hide('hotel');" value="tour">
                                Tour &nbsp&nbsp;
                                <input type="radio" name="search"  onClick="show('car');hide('tour');hide('hotel');hide('flight');" value="car"  >
                                Car &nbsp&nbsp&nbsp;
                                <input type="radio" name="search"  onClick="show('hotel');hide('tour');hide('car');hide('flight');" value="hotel" >
                                Hotel &nbsp
                                <input type="radio" name="search"  onClick="show('flight');hide('car');hide('tour');hide('hotel');" value="tour">
                                Flight
                            </form>
                            <hr width="80%"/>
                        </div>

                        <div id="tour">
                            <form action="tour.do?action=searchTour" method="post" >                               
                                <p><font color="#9BB9DA">Departure:</font>
                                    <select name="departure">
                                        <option value=""> Chose</option>
                                        <logic:present name="listDeparture">
                                            <logic:iterate id="list" name="listDeparture">
                                                <option><bean:write name="list" property="departure"/></option>
                                            </logic:iterate>
                                        </logic:present>
                                    </select>
                                </p>
                                <p class="style1"><font color="#9BB9DA">Destination:</font>
                                    <select name="destination">
                                        <option value=""> Chose</option>
                                        <logic:present name="listDestination">
                                            <logic:iterate id="list" name="listDestination">
                                                <option><bean:write name="list" property="destination"/></option>
                                            </logic:iterate>
                                        </logic:present>
                                    </select>
                                </p>
                                <p><font color="#9BB9DA">Package Tour:</font>
                                    <select name="typeName">
                                        <option value=""> Chose</option>
                                        <logic:present name="listTourType">
                                            <logic:iterate id="list" name="listTourType">
                                                <option><bean:write name="list" property="tourTypeName"/></option>
                                            </logic:iterate>
                                        </logic:present>
                                    </select>
                                </p><br/>
                                <p class="style1"><font color="#9BB9DA">LocationName:</font>
                                    <select name="locationName">
                                        <option value=""> Chose</option>
                                        <logic:present name="listLocation">
                                            <logic:iterate id="list" name="listLocation">
                                                <option><bean:write name="list" property="locationName"/></option>
                                            </logic:iterate>
                                        </logic:present>
                                    </select>
                                </p><br/>
                                <p><font color="#9BB9DA">Duration</font>
                                    <select name="duration">
                                        <option value="0"> Chose</option>
                                        <option>1</option>
                                        <option>2</option>
                                        <option>3</option>
                                        <option>4</option>
                                        <option>5</option>
                                        <option>6</option>
                                        <option>7</option>
                                        <option>9</option>
                                        <option>10</option>
                                        <option>11</option>
                                        <option>12</option>
                                        <option>13</option>
                                        <option>14</option>
                                        <option>15</option>
                                        <option>16</option>
                                        <option>17</option>
                                        <option>18</option>
                                        <option>19</option>
                                        <option>20</option>
                                    </select>
                                <br/>


                                
                                <p><input name="action" type="submit" value="Search"/></p>

                            </form>
                            <layer> </layer>
                        </div>
                        <div id="car" >

                            <form action="Car.do?action=searchCar" method="post" name="carForm" id="carForm" onsubmit="return validateForm(this,'seatMin','seatMax');">
                                <table width="100%">
                                    <tr>

                                        <td>Car Name: </td>
                                        <td><input type="text" name="carname" size="10"/>
                                        </td>
                                    </tr>
                                    <tr>

                                        <td>Car Type: </td>
                                        <td>
                                            <select name="type" >
                                                <option></option>
                                                <logic:present name="listType">
                                                    <logic:iterate id="listT" name="listType">
                                                        <option><bean:write name="listT" property="typeName"/></option>
                                                    </logic:iterate>
                                                </logic:present>

                                            </select>
                                        </td>
                                    </tr><br/>
                                    <tr>
                                        <td>Car Model: </td>
                                        <td>
                                            <select name="model">
                                                <option></option>
                                                <logic:present name="listModel">
                                                    <logic:iterate id="listM" name="listModel">
                                                        <option><bean:write name="listM" property="modelName"/></option>
                                                    </logic:iterate>
                                                </logic:present>
                                            </select>
                                        </td>
                                    </tr><br/>
                                    <tr>
                                        <td>AirConditional: </td>
                                        <td>
                                            <input type="radio" name="air"  value="1" checked > Yes
                                            <input type="radio" name="air"  value="0" > No
                                        </td>
                                    </tr><br/><br/>
                                    <tr>
                                        <td>Seat Quantity: </td>
                                        <td>
                                            From:<input size="5" type="text" name="seatMin"  onchange="isNumber(this)"/><br/><br/>
                                            To:<input size="5" type="text" name="seatMax"  onchange="isNumber(this);"/>
                                        </td>
                                    </tr><br/><br/>
                                    <tr>
                                        <td colspan="2">
                                            <p class="pad3">
                                                <span>
                                                    <input type="submit" value="Search">
                                                </span>
                                            </p>
                                        </td>
                                    </tr>
                                </table>
                            </form>
                            <layer> </layer>
                        </div>


                        <div id="hotel" >
                            <form action="hotel.do?action=searchHotel" method="post">
                                <p class="style1">Hotel search</p>
                                <table>

                                    <tr>
                                        <td><p class="pad2"> City</p></td>
                                        <td><select name="city">
                                                <option value=""> Choose </option>
                                                <logic:present name="listCity">
                                                    <logic:iterate id="list" name="listCity">
                                                        <option><bean:write name="list" property="city"/></option>
                                                    </logic:iterate>
                                                </logic:present>

                                            </select>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td><input type="submit" value="Search"/> </td>
                                    </tr>
                                </table>
                            </form>
                            <layer> </layer>
                        </div>
                        <div id="flight" >
                            <p class="style1">Flight search</p>
                            <form action="flight.do?action=searchFlight" method="post">
                                <table>
                                    <tr>
                                        <td><p class="pad2"> Departure:</p></td>
                                        <td><select name="departureS">
                                                <option value="">Choose</option>
                                                <logic:present name="listDepartureS">
                                                    <logic:iterate id="list" name="listDepartureS">
                                                        <option> <bean:write name="list" property="departure"/> </option>
                                                    </logic:iterate>
                                                </logic:present>

                                            </select>
                                        </td>
                                    </tr>

                                    <tr>
                                        <td><p class="pad2"> Destination</p></td>
                                        <td><select name="destinationS">
                                                <option value="">Choose</option>
                                                <logic:present name="listDestinationS">
                                                    <logic:iterate id="list" name="listDestinationS">
                                                        <option> <bean:write name="list" property="destination"/> </option>
                                                    </logic:iterate>
                                                </logic:present>

                                            </select>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2"><p class="pad3"><span>
                                                    <input type="submit" value="Search">
                                                </span></p></td>
                                    </tr>

                                </table>
                            </form>

                        </div>
                    </td>
                </tr>
            </table>
        </TD>
    </TR>

    <TR>
        <TD class="bottom"><IMG border=0 alt="" src="img/pod_main_bottom_left.gif"></TD>
        <TD class="bottomright"><P align=right>&nbsp;</P></TD>
        <TD class="bottomleft"><IMG border=0 alt="" src="img/pod_main_bottom_right.gif"></TD>
    </TR>
</TABLE>